<script setup>
import {
    Management,
    Promotion,
    UserFilled,
    User,
    Crop,
    EditPen,
    CaretBottom
} from '@element-plus/icons-vue'

</script>

<template>
    
    <el-container class="layout-container" >
        <!-- 左侧菜单 -->
        <el-aside width="200px">
           
            <el-menu active-text-color="#ffd04b" background-color="#232323"  text-color="#fff"
                router>
                <el-menu-item index="/article/list">
                    <el-icon>
                        <Management />
                    </el-icon>
                    <span>文章目录</span>
                </el-menu-item>
                <el-menu-item index="/article/manage" >
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>文章管理</span>
                </el-menu-item>
                <el-sub-menu >
                    <template #title>
                        <el-icon>
                            <UserFilled />
                        </el-icon>
                        <span>个人中心</span>
                    </template>
                    <el-menu-item index="/user/userInfo">
                        <el-icon>
                            <User />
                        </el-icon>
                        <span>基本资料</span>
                    </el-menu-item>
                    <el-menu-item index="/user/register">
                        <el-icon>
                            <Crop />
                        </el-icon>
                        <span>添加管理</span>
                    </el-menu-item>
                    <el-menu-item index="/user/updatePwd">
                        <el-icon>
                            <EditPen />
                        </el-icon>
                        <span>重置密码</span>
                    </el-menu-item>
                </el-sub-menu>
            </el-menu>
        </el-aside>
        <!-- 右侧主区域 -->
        <el-container >
            <!-- 头部区域 -->
            <el-header >
                <div style="color: aliceblue;">用户：<strong>zuter</strong></div>
                <el-dropdown placement="bottom-end">
                    <el-dropdown placement="bottom-end">
                    <span class="el-dropdown__box">
                        
                        <el-icon>
                            <CaretBottom />
                        </el-icon>
                    </span>
                    <template #dropdown>
                        <el-dropdown-menu>
                           
                            <el-dropdown-item command="logout" :icon="SwitchButton">退出登录</el-dropdown-item>
                        </el-dropdown-menu>
                    </template>
                </el-dropdown> 
                    
                </el-dropdown>
            </el-header>
            <!-- 中间区域 -->
            <el-main >
              
                <router-view></router-view>
                
            </el-main>
            <!-- 底部区域 -->
            <el-footer style="width: auto;">软件学院网站后台 ©2024 Created by ZUTER</el-footer>
        </el-container>
    </el-container>
    
</template>

<style lang="scss" scoped>
.layout-container {
    height: 100vh;
   

    .el-aside {
        background-color: #232323;

      

        .el-menu {
            border-right: none;
        }
    }

    .el-header {
        background-color: #232323;
        display: flex;
        align-items: center;
        justify-content: space-between;

       
        .el-dropdown__box {
            display: flex;
            align-items: center;
        }
            .el-icon {
                color: #ebe7e7;
                margin-left: 10px;
                margin-right: 2px;
            }

            &:active,
            &:focus {
                outline: none;
            }
        }
    
    .el-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #666;
    }
   
}
</style>